﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZhuXingFamilys.ExportExcel.entity
{
    [Serializable]
    public class DefinitionNode
    {
        // 类别ID
        public string SpecialitieId { get; set; }
        // 父级
        public string Parent { get; set; }
        // 菜单名称
        public string Name { get; set; }
        // 子级
        public IList<DefinitionNode> Children { get; set; }

        // override object.Equals
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return false;
            }
            DefinitionNode d = (DefinitionNode)obj;
            if (d.Name!= null && d.Name.Equals(Name) && d.SpecialitieId.Equals(SpecialitieId))
            {
                return true;
            }
            return false;
        }

        // override object.GetHashCode
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
